package com.oceanread.cn.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.oceanread.cn.entity.Pipeline;
import com.oceanread.cn.entity.Treelist1;
import com.oceanread.cn.mapper.PipelineMapper;
import com.oceanread.cn.mapper.Treelist1Mapper;
import com.oceanread.cn.service.IPipelineService;
import com.oceanread.cn.service.ITreelist1Service;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ITreelist1ServiceImpl extends ServiceImpl<Treelist1Mapper, Treelist1> implements ITreelist1Service {
    public List<Treelist1> getall() {
        return baseMapper.getall();
    }

    public List<Treelist1> query(String key, String value) {
        return baseMapper.query(key, value);
    }
    public List<Treelist1> equal(String key, String value) {
        return baseMapper.equal(key, value);
    }

    @Override
    public List<Treelist1> getTablelist(int page, int size) {
        return baseMapper.getTablelist((page - 1) * size, size);
    }

    @Override
    public Integer getnum() {
        return baseMapper.getnum();
    }

    @Override
    public Integer update(Treelist1 treelist1) {
        return baseMapper.update(treelist1.getSysid(), treelist1.getId(), treelist1.getName(),treelist1.getOpen(),
                treelist1.getChecked(),treelist1.getInfluencechild());
    }

    @Override
    public int insert(String id, String name,Boolean open,Boolean checked,Boolean influencechild) {
        return baseMapper.insert(id, name,open,checked,influencechild);
    }

    public Integer delete(int SYSID) {
        return baseMapper.delete(SYSID);
    }
}
